package com.hp.snap.gr.model.jaxb;

import javax.xml.bind.annotation.*;
import java.util.LinkedList;
import java.util.List;


/**
 * <p>Java class for TaskType complex type.
 * <p/>
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p/>
 * <pre>
 * &lt;complexType name="TaskType">
 *   &lt;complexContent>
 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       &lt;sequence>
 *         &lt;element name="ActionPlan" type="{}ActionPlanRefType" maxOccurs="unbounded"/>
 *       &lt;/sequence>
 *       &lt;attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
 *       &lt;attribute name="async" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
 *     &lt;/restriction>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TaskType", propOrder = {
        "actionPlan"
})
public class TaskType {

    @XmlElement(name = "ActionPlan", required = true)
    protected List<ActionPlanRefType> actionPlan;
    @XmlAttribute(required = true)
    protected String name;
    @XmlAttribute
    protected Boolean async;
    @XmlAttribute
    protected String next;
    /**
     * Gets the value of the actionPlan property.
     * <p/>
     * <p/>
     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a <CODE>set</CODE> method for the actionPlan property.
     * <p/>
     * <p/>
     * For example, to add a new item, do as follows:
     * <pre>
     *    getActionPlan().add(newItem);
     * </pre>
     * <p/>
     * <p/>
     * <p/>
     * Objects of the following type(s) are allowed in the list
     * {@link ActionPlanRefType }
     */
    public List<ActionPlanRefType> getActionPlan() {
        if (actionPlan == null) {
            actionPlan = new LinkedList<ActionPlanRefType>();
        }
        return this.actionPlan;
    }

    /**
     * Gets the value of the name property.
     *
     * @return possible object is
     * {@link String }
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of the name property.
     *
     * @param value allowed object is
     *              {@link String }
     */
    public void setName(String value) {
        this.name = value;
    }

    /**
     * Gets the value of the next property.
     *
     * @return possible object is
     * {@link String }
     */
    public String getNext() {
        return next;
    }

    /**
     * Sets the value of the next property.
     *
     * @param next allowed object is
     *              {@link String }
     */
    public void setNext(String next) {
        this.next = next;
    }

    /**
     * Gets the value of the async property.
     *
     * @return possible object is
     * {@link Boolean }
     */
    public boolean isAsync() {
        if (async == null) {
            return false;
        } else {
            return async;
        }
    }

    /**
     * Sets the value of the async property.
     *
     * @param value allowed object is
     *              {@link Boolean }
     */
    public void setAsync(Boolean value) {
        this.async = value;
    }

}
